﻿using PHMEE.ToolKits;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace PHMEE.Admin
{
    public interface IVesselAppService : IApplicationService
    {
        Task<VesselDto> GetVesselByIdAsync(Guid id);
        Task<PagedResultDto<VesselDto>> GetPagedVesselsAsync(VesselListDto input);
        Task<Guid> CreateVesselAsync(VesselCreateDto input);
        Task UpdateVesselAsync(VesselUpdateDto input);
        Task DeleteVesselAsync(Guid id);
        List<OperationOptionInt> GetVesselTypes(Guid? id);
        List<OperationOptionInt> GetVesselFlowMeterModes(Guid? id);
        Task<List<VesselBatchTree>> GetVesselUnitInitialRows(List<Guid> vesselIds);
        Task BatchVesselUnitRows(List<VesselBatchTree> rows);


        Task<UnitDto> GetUnitByIdAsync(Guid id, Guid vesselId);
        Task<Guid> CreateUnitAsync(UnitCreateDto input);
        Task UpdateUnitAsync(UnitUpdateDto input);
        Task DeleteUnitAsync(Guid id, Guid vesselId);
        Task<PagedResultDto<UnitDto>> GetPagedUnitsAsync(UnitListDto input);
        List<OperationOptionInt> GetUnitTypes(Guid? id);
        Dictionary<string, object> GetUnitInitDefaultProperties(UnitEnum type);

        Task<EquipmentDto> GetEquipmentByIdAsync(Guid id, Guid vesselId, Guid unitId);
        Task<Guid> CreateEquipmentAsync(EquipmentCreateDto input);
        Task UpdateEquipmentAsync(EquipmentUpdateDto input);
        Task DeleteEquipmentAsync(Guid id, Guid vesselId, Guid unitId);
        Task<PagedResultDto<EquipmentDto>> GetPagedEquipmentsAsync(EquipmentListDto input);
        Task<List<OperationOptionInt>> GetEquipmentTypes(Guid? id,Guid vesselId,Guid unitId);
        List<OperationOptionInt> GetEquipmentRotationModes();
        List<OperationOptionInt> GetEquipmentConnectModes();
        List<OperationOptionInt> GetEquipmentSupportFlexibilityModes();
        List<OperationOptionInt> GetEquipmentBearingTypes();


        Task<ComponentDto> GetComponentByIdAsync(Guid id, Guid vesselId, Guid unitId, Guid equipmentId);
        Task<Guid> CreateComponentAsync(ComponentCreateDto input);
        Task UpdateComponentAsync(ComponentUpdateDto input);
        Task DeleteComponentAsync(Guid id, Guid vesselId, Guid unitId, Guid equipmentId);
        Task<PagedResultDto<ComponentDto>> GetPagedComponentsAsync(ComponentListDto input);
        Task<List<OperationOptionInt>> GetComponentTypes(Guid? id, Guid vesselId, Guid unitId, Guid equipmentId);

        Task<VesselRelationDto> GetUnitRelation(Guid unitId);
        Task<VesselRelationDto> GetEquipmentRelation(Guid equipmentId);
        Task<VesselRelationDto> GetComponentRelation(Guid componentId);
        Task<List<VesselTree>> GetBaseInfoTree(bool includePoints);
        List<OperationOptionInt> GetBaseInfoTags(string ownerType);

        List<OperationOptionInt> GetBaseInfoNumbers();

    }

}
